import React  from 'react';
// 电影组件
export default class Films extends React.Component{

  state = {
    list:[]
  }
  componentDidMount() {
      
    this.setState({
      list: [{'filmId':'01','name': '长津湖'},{'filmId':'02','name': '满江红'}]
    });
  }

  render() {
    console.log("render");
    return (
      <div>
          <ul>
            {this.state.list.map((item) => (
              <li key={item.filmId}>{item.name}</li>
            ))}
          </ul>
      </div>
    );
  }

}


